package com.rkc.service;

import com.rkc.model.CouponRecordMessage;
import com.rkc.request.LockCouponRecordRequest;
import com.rkc.utils.JsonData;
import com.rkc.vo.CouponRecordVO;

import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 冉堃赤
 * @since 2021-10-22
 */
public interface CouponRecordService {

    /**
     * 分页查询领券记录
     * @param page
     * @param size
     * @return
     */
    Map<String, Object> page(int page, int size);

    /**
     * 根据id查看详情
     * @param id
     * @return
     */
    CouponRecordVO findById(long id);

    /**
     * 锁定优惠券
     * @param recordRequest
     * @return
     */
    JsonData lockCouponRecords(LockCouponRecordRequest recordRequest);

    /**
     * 解锁优惠券记录
     * @param couponRecordMessage
     * @return
     */
    boolean releaseCouponRecord(CouponRecordMessage couponRecordMessage);
}
